#include "context.h"

Context::Context(const Student& student) :
    student_(student)
{
}

Student Context::student() const
{
    return student_;
}

void Context::student(const Student& student)
{
    student_ = student;
}

/// Marks a requirement as fulfilled.
/// \param req Requirement to mark fulfilled.
void Context::check_requirement(shared_ptr<Requirement> req)
{
    met_requirements_.insert(req);
}

/// Checks whether a given requirement is met.
/// \param req The requirement to check for.
/// \return True if the requirement is fulfilled, false otherwise.
bool Context::requirement_met(shared_ptr<Requirement> req)
{
    return met_requirements_.find(req) != met_requirements_.end();
}
